package com.example.system.service;

import com.example.common.response.SystemResponse;
import com.example.system.dto.AuthorizedLoginDTO;
import com.example.system.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yoonada
 * @since 2020-10-28
 */
public interface IUserService extends IService<User> {

    /**
     * 授权登录
     * @param authorizedLoginDTO
     * @return
     */
    SystemResponse authorizedLogin(AuthorizedLoginDTO authorizedLoginDTO);

    /**
     * 获取OpenId
     * @param code
     * @return
     * @throws Exception
     */
    SystemResponse getOpenId(String code) throws Exception;

    /**
     * 微信登录
     * @param code
     * @return
     * @throws Exception
     */
    SystemResponse wxLogin(String code) throws Exception;

    /**
     * 获取用户信息
     * @return
     */
    SystemResponse getUserInfo();
}
